home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group01b.txt
/
000146_icon-group-sender_Tue Sep 25 16:37:27 2001.msg
< prev
next >
Wrap
Internet Message Format
|
2002-01-03
|
3KB
Return-Path: <icon-group-sender>
Received: (from root@localhost)
by baskerville.CS.Arizona.EDU (8.11.1/8.11.1) id f8PNbOM19787
for icon-group-addresses; Tue, 25 Sep 2001 16:37:24 -0700 (MST)
Message-Id: <200109252337.f8PNbOM19787@baskerville.CS.Arizona.EDU>
Date: Tue, 25 Sep 2001 14:01:03 -0700
From: Steve Wampler <swampler@noao.edu>
X-Accept-Language: en
To: Bruce Gordon Rennie <brennie@dcsi.net.au>
CC: icon-group@cs.arizona.edu
Subject: Re: Line limit for ICON on input
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
Content-Length: 2061
Bruce Gordon Rennie wrote:
>
> To all,
>
> I am reading a text file that is very large (over 100 Mbytes) and am using the
> following simple program to read and then write the file.
>
> procedure main()
> local ifile, cnttab, line, keyword, linesp, keyw, outp
> write("Translation")
> (ifile := open("f:\\A\\ForthNG.txt","r")) & write("Have opened file")
> linesp := 0
> cnttab := table(0)
> outp := open("f:\\a\\forthSumNG.txt","w")
> while line := read(ifile) do {
> line ? (if ( ="Date:" ) then write(outp,line))
> (((linesp +:= 1 ) % 1000) = 0) & write(".",linesp)
> if (linesp > 204900) then write(line)
>
> }
> write(".",linesp)
> end
>
> However, it is stopping at line 204931. The purpose is to remove a set of line,
> of which one is given as an example. But it is not getting past the above line.
> My estimate is that there is over a million lines in this file. Can anyone shed
> any light on this.
>
> I am using ICON for Windows Version 9.3.1 May 4 1998. Any help appreciated.
Are you sure this isn't a windows problem? I just ran the following variant
of your program on Linux on a 1GB input file (8,388,609 lines) with no problems:
procedure main(args)
local ifile, cnttab, line, keyword, linesp, keyw, outp
write("Translation")
inFile := args[1]
outFile := args[2]
(ifile := open(inFile,"r")) & write("Have opened file")
linesp := 0
cnttab := table(0)
outp := open(outFile,"w")
while line := read(ifile) do {
# line ? (if ( ="Date:" ) then write(outp,line))
(((linesp +:= 1 ) % 1000) = 0) & write(".",linesp)
# (linesp > 204900) then write(line)
}
write(".",linesp)
end
Hmmm, I wonder how many *bytes* you are into the file when it hangs? I bet
it's close to some magic power of two...
--
Steve Wampler- SOLIS Project, National Solar Observatory
swampler@noao.edu